package org.ehe.common.core.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author :zhangnn
 * @className :BusinessException
 * @description: TODO
 * @date 2025-07-17 16:48:25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class BusinessException extends RuntimeException {
    // 错误码
    private String code;

    // 构造方法
    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(String code, String message) {
        super(message);
        this.code = code;
    }

    // get/set方法
    public String getCode() { return code; }
    public void setCode(String code) { this.code = code; }
}
